Ext.Loader.setConfig({
            enabled : true,
            disableCachingParam : 'dc',
            disableCaching : isDebug === true ? true : false,
            paths : {// '类名前缀':'所在路径'
                'Extend' : context + 'libs/Extend',
                'MExt' : context + 'MExt',
                'App' : context + 'App',
                'Ext.ux' : extPath + 'ux'
            }
        });
Ext.state.Manager.setProvider(new Ext.state.LocalStorageProvider());
Ext.require(['Extend.window.MessageBox', 'Extend.Utils']);
Ext.tip.QuickTipManager.init();
window.addEventListener('keydown', function(e)
        {
            if (event.keyCode == 8)
            {
                if (e.target.nodeName != "INPUT" && e.target.nodeName != "TEXTAREA" && e.target.className != "dotitem")
                {
                    if (Ext.isFunction(e.stopEvent))
                    {
                        e.stopEvent();
                    }
                    if (Ext.isFunction(e.preventDefault))
                    {
                        e.preventDefault();
                    }
                }
            }
        });

Ext.override(Ext.grid.plugin.RowEditing, {
            onCellClick : function(view, cell, colIdx, record, row, rowIdx, e)
            {
                if (this.clicksToEdit === false || this.clicksToMoveEditor === false)
                {
                    return;
                }
                // Make sure that the column has an editor. In the case of
                // CheckboxModel,
                // calling startEdit doesn't make sense when the checkbox is
                // clicked.
                // Also, cancel editing if the element that was clicked was a
                // tree expander.
                var expanderSelector = view.expanderSelector,
                // Use getColumnManager() in this context because colIdx
                // includes hidden columns.
                columnHeader = view.ownerCt.getColumnManager().getHeaderAtIndex(colIdx), editor = columnHeader
                        .getEditor(record);

                if (this.shouldStartEdit(editor) && (!expanderSelector || !e.getTarget(expanderSelector)))
                {
                    view.ownerGrid.setActionableMode(true, e.position);
                }
            }
        });

// 解决Model创建后日期字段相关8小时问题
// 重写Model日期格式转换问题
// 原数据带T，原来在处理这样的日期时会导致时间+8小时问题
// 将原数据的T替换成“ ”解决。
Ext.override(Ext.data.field.Date, {
            convert : function(v)
            {
                if (!Ext.isEmpty(arguments) && Ext.isString(arguments[0]) && !Ext.isEmpty(arguments[0]))
                {
                    arguments[0] = arguments[0].replace(/T/g, ' ')
                }
                return this.callParent(arguments);
            }
        });